﻿@model IEnumerable<ESN.Models.Exercise>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ExDone)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExShot)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExContent)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExBeginTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExEndTime)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExPublic)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ExFreeShot)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.UserId)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ExDone)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExShot)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExContent)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExBeginTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExEndTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExPublic)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ExFreeShot)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ExId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ExId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ExId })
        </td>
    </tr>
}

</table>
